<template>
  <el-dialog v-model="dialogVisible" title="警告" width="30%">
    <span>{{ errorMsg }}</span>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogVisible = false">Cancel</el-button>
        <el-button type="primary" @click="dialogVisible = false">
          Confirm
        </el-button>
      </span>
    </template>
  </el-dialog>
</template>
  
  
  <script>
import { ElMessageBox } from "element-plus";

export default {
  name: "app",
  data() {
    return {
      dialogVisible: false,
      errorMsg: "",
    };
  },
  methods: {
    show(errorMsg) {
      this.errorMsg = errorMsg;
      this.dialogVisible = true;
    },
  },
};
</script>
  
  
  <style lang="scss">
</style>
  